package com.day0426.user;/*
 * @创建者：黄苟苟
 * @创建时间：2021/4/26   10:29
 * @Description描述
 **/

import com.day0426.sys.ControlSys;

import java.util.Scanner;

public  class Guest {
   private  String name;
   public Guest(){}

    public Guest(String name) {
        this.name = name;
    }
    public void pressRing(ControlSys controlSys){
        Scanner scanner=new Scanner(System.in);
        System.out.println("访客("+this.getName()+")按下门铃");
        String btn =scanner.nextLine();
        if (btn.equals("y")){
//            controlSys.ring();
//            controlSys.
        }else if (btn.equals("n")){
            return;
        }

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
